#include <iostream>
#include <stdio.h>
using namespace std;

class figure
{
public:
	virtual void getarea()=0;
};

class circle:public figure
{
public:
	circle(int a)
	{
		this->a=a;
	}
	void getarea()
	{
		printf("circle area : %f\n",(3.14*a*a));
	}
private:
     int a;
};

class tri:public figure
{
public:
	tri(int a,int b)
	{
		this->a=a;
		this->b=b;
		}
	void getarea()
	{
		printf("tri area : %d\n",a*b/2);
	}
private:
     int a;
     int b;
};

int main()
{
     circle c(2);
     c.getarea();
     
     tri t(1,2);
     figure *f=&t;
     f->getarea();
     return 0;
}

